<?php
require_once 'library/define/define.php';

// Define path to application directory
defined('APPLICATION_PUBLIC')
    || define('APPLICATION_PUBLIC',
              realpath(dirname(__FILE__) . '/public'));


defined('APPLICATION_PATH')
    || define('APPLICATION_PATH',
              realpath(dirname(__FILE__) . '/application'));

// Define application environment
defined('APPLICATION_ENV')
    || define('APPLICATION_ENV',
              (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV')
                                         : 'production'));

// Typically, you will also want to add your library/ directory
// to the include_path, particularly if it contains your ZF installed
set_include_path(implode(PATH_SEPARATOR, array(
    dirname(__FILE__) . '/library',
    get_include_path(),
)));

require_once 'Zend/Loader.php';
Zend_Loader::loadClass('Zend_Session_Namespace');
//set Language
$lang = new Zend_Session_Namespace('language');
if(!isset($lang->type) && !is_int($lang->type))
        $lang->type = VN;


$isCounted = new Zend_Session_Namespace('count');
if(!isset($isCounted->check))
        $isCounted->check = true;

/** Zend_Application */
require_once 'Zend/Application.php';

//$autoloader->setFallbackAutoloader('true');
$environment = APPLICATION_ENV;
$options = APPLICATION_PATH . '/configs/application.ini';
$application = new Zend_Application($environment, $options);

$application->bootstrap()->run();




